public class HomeWorkDemo02 {
    public static void main(String[] args) {
//        double money = 100000;
//        int count = 0;
//        for (; ; ) {
//            if (money > 50000) {
//                money -= money * 0.05;// money = money-money*0.05
//            } else {
//                money -= 5000;
//            }
//            count++;
//            if (money < 5000) {
//                break;
//            }
//        }
//        System.out.println(count);


        double money = 100000;
        int count = 0;
        while (money >= 5000) {
            if (money > 50000) {
                money -= money * 0.05;// money = money-money*0.05
            } else {
                money -= 5000;
            }
            count++;

        }
        System.out.println(count);
    }

}
